<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <title>Document</title>
       <script src="./fengzhuang.js"></script>
</head>
<body>
    <script>
        let obj = {name:'张麻子'}
        http.get('http://139.9.177.51:3333/api/testGet',obj,function(res){
            console.log(res);
        })
        http.post('http://139.9.177.51:3333/api/testpost',obj,function(res){
            console.log(res);
        })
        http.ajax({
            type:'get',
            url:'http://139.9.177.51:3333/api/testGet',
            data:obj,
            success:function(res){
                console.log('万能请求 get',res);
            }
        })
        http.ajax({
            type:'post',
            url:'http://139.9.177.51:3333/api/testpost',
            data:obj,
            success:function(res){
                console.log('万能请求 post',res);
            }
        })
    </script>
</body>
</html>